package com.zhanghuang.springbootstudy01.configuration;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.View;
import org.springframework.web.servlet.ViewResolver;

import java.util.Locale;

@Configuration
public class MyViewResolverConfig {
    @Bean
    public ViewResolver getMyViewResolver(){
        return new MyViewResolver();
    }
}
// 自定义视图解析器
class MyViewResolver implements  ViewResolver{

    @Override
    public View resolveViewName(String viewName, Locale locale) throws Exception {
        //具体解析方法
        return null;
    }
}